# -*- coding: utf-8 -*- 

###########################################################################
## Python code generated with wxFormBuilder (version Jun 30 2011)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################

import wx
import wx.xrc
from GameDrawPanelManager import GameDrawPanelManager
import wx.richtext

###########################################################################
## Class MainGUI
###########################################################################

class MainGUI ( wx.Frame ):
	
	def __init__( self, parent ):
		wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Chat Bite", pos = wx.DefaultPosition, size = wx.Size( 1280,768 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
		
		self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
		
		bSizer1 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_panel1 = wx.Panel( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer2 = wx.BoxSizer( wx.VERTICAL )
		
		self._mPanelTitle = wx.Panel( self.m_panel1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.SUNKEN_BORDER|wx.TAB_TRAVERSAL )
		bSizer3 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText1 = wx.StaticText( self._mPanelTitle, wx.ID_ANY, u"Chat-Bite / Chaton-Zizi", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText1.Wrap( -1 )
		self.m_staticText1.SetFont( wx.Font( 18, 71, 94, 92, False, wx.EmptyString ) )
		
		bSizer3.Add( self.m_staticText1, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
		
		self._mPanelTitle.SetSizer( bSizer3 )
		self._mPanelTitle.Layout()
		bSizer3.Fit( self._mPanelTitle )
		bSizer2.Add( self._mPanelTitle, 0, wx.EXPAND, 5 )
		
		self.m_staticline1 = wx.StaticLine( self.m_panel1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer2.Add( self.m_staticline1, 0, wx.EXPAND|wx.TOP|wx.BOTTOM, 5 )
		
		self._mGamePanel = wx.Panel( self.m_panel1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer4 = wx.BoxSizer( wx.HORIZONTAL )
		
		self._mPanelServer = wx.Panel( self._mGamePanel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.SUNKEN_BORDER|wx.TAB_TRAVERSAL )
		self._mPanelServer.SetExtraStyle( wx.WS_EX_TRANSIENT )
		
		bSizer5 = wx.BoxSizer( wx.VERTICAL )
		
		self._mPanelConnectInfo = wx.Panel( self._mPanelServer, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer6 = wx.BoxSizer( wx.VERTICAL )
		
		self._mIpTextCtrl = wx.TextCtrl( self._mPanelConnectInfo, wx.ID_ANY, u"localhost", wx.DefaultPosition, wx.DefaultSize, 0 )
		self._mIpTextCtrl.SetToolTipString( u"Ip" )
		
		bSizer6.Add( self._mIpTextCtrl, 0, wx.ALL|wx.EXPAND, 5 )
		
		self._mPortTextCtrl = wx.TextCtrl( self._mPanelConnectInfo, wx.ID_ANY, u"12345", wx.DefaultPosition, wx.DefaultSize, 0 )
		self._mPortTextCtrl.SetToolTipString( u"Port" )
		
		bSizer6.Add( self._mPortTextCtrl, 0, wx.ALL|wx.EXPAND, 5 )
		
		self._mNickNameTextCtrl = wx.TextCtrl( self._mPanelConnectInfo, wx.ID_ANY, u"Cybil", wx.DefaultPosition, wx.DefaultSize, 0 )
		self._mNickNameTextCtrl.SetToolTipString( u"Nickname" )
		
		bSizer6.Add( self._mNickNameTextCtrl, 0, wx.ALL|wx.EXPAND, 5 )
		
		self._mHostButton = wx.Button( self._mPanelConnectInfo, wx.ID_ANY, u"Start Server", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer6.Add( self._mHostButton, 1, wx.ALL|wx.EXPAND, 5 )
		
		self._mConnectionButton = wx.Button( self._mPanelConnectInfo, wx.ID_ANY, u"Connect", wx.DefaultPosition, wx.DefaultSize, 0|wx.TAB_TRAVERSAL )
		self._mConnectionButton.SetExtraStyle( wx.WS_EX_TRANSIENT )
		
		bSizer6.Add( self._mConnectionButton, 0, wx.ALL|wx.EXPAND, 5 )
		
		self._mPanelConnectInfo.SetSizer( bSizer6 )
		self._mPanelConnectInfo.Layout()
		bSizer6.Fit( self._mPanelConnectInfo )
		bSizer5.Add( self._mPanelConnectInfo, 0, wx.ALL|wx.EXPAND, 5 )
		
		self.m_staticline2 = wx.StaticLine( self._mPanelServer, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer5.Add( self.m_staticline2, 0, wx.EXPAND |wx.ALL, 5 )
		
		bSizer7 = wx.BoxSizer( wx.VERTICAL )
		
		self.m_staticText2 = wx.StaticText( self._mPanelServer, wx.ID_ANY, u"Connected Players:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText2.Wrap( -1 )
		bSizer7.Add( self.m_staticText2, 0, wx.ALL|wx.EXPAND, 5 )
		
		_mPlayerListBoxChoices = []
		self._mPlayerListBox = wx.ListBox( self._mPanelServer, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, _mPlayerListBoxChoices, 0|wx.TAB_TRAVERSAL )
		self._mPlayerListBox.SetExtraStyle( wx.WS_EX_TRANSIENT )
		
		bSizer7.Add( self._mPlayerListBox, 1, wx.ALL|wx.EXPAND, 5 )
		
		bSizer5.Add( bSizer7, 1, 0, 5 )
		
		self.m_staticline3 = wx.StaticLine( self._mPanelServer, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
		bSizer5.Add( self.m_staticline3, 0, wx.EXPAND |wx.ALL, 5 )
		
		bSizer8 = wx.BoxSizer( wx.VERTICAL )
		
		self._mReadyButton = wx.Button( self._mPanelServer, wx.ID_ANY, u"Ready ?", wx.DefaultPosition, wx.DefaultSize, 0|wx.TAB_TRAVERSAL )
		self._mReadyButton.SetExtraStyle( wx.WS_EX_TRANSIENT )
		
		bSizer8.Add( self._mReadyButton, 0, wx.ALL|wx.EXPAND, 5 )
		
		bSizer5.Add( bSizer8, 0, wx.EXPAND, 5 )
		
		self._mPanelServer.SetSizer( bSizer5 )
		self._mPanelServer.Layout()
		bSizer5.Fit( self._mPanelServer )
		bSizer4.Add( self._mPanelServer, 0, wx.EXPAND, 5 )
		
		self._mCentralPanel = wx.Panel( self._mGamePanel, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
		bSizer9 = wx.BoxSizer( wx.VERTICAL )
		
		self._mGameDrawPanel = GameDrawPanelManager(self._mCentralPanel)
		self._mGameDrawPanel.SetExtraStyle( wx.WS_EX_BLOCK_EVENTS|wx.WS_EX_PROCESS_UI_UPDATES|wx.WS_EX_TRANSIENT )
		
		bSizer9.Add( self._mGameDrawPanel, 1, wx.ALL|wx.EXPAND, 5 )
		
		self._mCentralPanel.SetSizer( bSizer9 )
		self._mCentralPanel.Layout()
		bSizer9.Fit( self._mCentralPanel )
		bSizer4.Add( self._mCentralPanel, 1, wx.EXPAND |wx.ALL, 5 )
		
		self._mChatPanel = wx.Panel( self._mGamePanel, wx.ID_ANY, wx.DefaultPosition, wx.Size( -1,-1 ), wx.TAB_TRAVERSAL )
		bSizer10 = wx.BoxSizer( wx.VERTICAL )
		
		bSizer10.SetMinSize( wx.Size( 280,-1 ) ) 
		self.m_staticText3 = wx.StaticText( self._mChatPanel, wx.ID_ANY, u"Tchat:", wx.DefaultPosition, wx.DefaultSize, 0 )
		self.m_staticText3.Wrap( -1 )
		self.m_staticText3.SetFont( wx.Font( 15, 71, 90, 90, False, wx.EmptyString ) )
		
		bSizer10.Add( self.m_staticText3, 0, wx.ALL, 5 )
		
		self._mTchatBox = wx.richtext.RichTextCtrl( self._mChatPanel, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0|wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER|wx.WANTS_CHARS )
		self._mTchatBox.Enable( False )
		
		bSizer10.Add( self._mTchatBox, 1, wx.EXPAND |wx.ALL, 5 )
		
		bSizer11 = wx.BoxSizer( wx.VERTICAL )
		
		self._mSendMsgTextCtrl = wx.TextCtrl( self._mChatPanel, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.DefaultSize, 0 )
		self._mSendMsgTextCtrl.SetToolTipString( u"Write Something" )
		
		bSizer11.Add( self._mSendMsgTextCtrl, 1, wx.ALL|wx.EXPAND, 5 )
		
		self._mSendMsgButton = wx.Button( self._mChatPanel, wx.ID_ANY, u"Send", wx.DefaultPosition, wx.DefaultSize, 0 )
		bSizer11.Add( self._mSendMsgButton, 0, wx.ALL|wx.ALIGN_RIGHT, 5 )
		
		bSizer10.Add( bSizer11, 0, wx.EXPAND, 5 )
		
		self._mChatPanel.SetSizer( bSizer10 )
		self._mChatPanel.Layout()
		bSizer10.Fit( self._mChatPanel )
		bSizer4.Add( self._mChatPanel, 0, wx.ALL|wx.EXPAND, 5 )
		
		self._mGamePanel.SetSizer( bSizer4 )
		self._mGamePanel.Layout()
		bSizer4.Fit( self._mGamePanel )
		bSizer2.Add( self._mGamePanel, 1, wx.EXPAND, 5 )
		
		self.m_panel1.SetSizer( bSizer2 )
		self.m_panel1.Layout()
		bSizer2.Fit( self.m_panel1 )
		bSizer1.Add( self.m_panel1, 1, wx.EXPAND |wx.ALL, 5 )
		
		self.SetSizer( bSizer1 )
		self.Layout()
		
		self.Centre( wx.BOTH )
		
		# Connect Events
		self._mHostButton.Bind( wx.EVT_BUTTON, self.OnHostButtonClick )
		self._mConnectionButton.Bind( wx.EVT_BUTTON, self.OnConectButtonClick )
		self._mReadyButton.Bind( wx.EVT_BUTTON, self.OnReadyButtonClick )
		self._mSendMsgTextCtrl.Bind( wx.EVT_TEXT_ENTER, self.OnSendMsgTextEnter )
		self._mSendMsgButton.Bind( wx.EVT_BUTTON, self.OnSendMsgButtonClick )
	
	def __del__( self ):
		pass
	
	
	# Virtual event handlers, overide them in your derived class
	def OnHostButtonClick( self, event ):
		event.Skip()
	
	def OnConectButtonClick( self, event ):
		event.Skip()
	
	def OnReadyButtonClick( self, event ):
		event.Skip()
	
	def OnSendMsgTextEnter( self, event ):
		event.Skip()
	
	def OnSendMsgButtonClick( self, event ):
		event.Skip()
	

